from IPython.display import Latex
Latex(r"""\begin{eqnarray} \large
Z_{n+1} = Z_{n}^(-e^(Z_{n}^p)^(e(Z_{n}^p)^(-e(Z_{n}^p)^(e(Z_{n}^p)^(-e(Z_{n}^p)^(e(Z_{n}^p)^(-e(Z_{n}^p))))))))
\end{eqnarray}""")
Sequential iteration on the complex plane of difference equation:
Z = Z^(-exp(Z^p)^(exp(Z^p)^(-exp(Z^p)^(exp(Z^p)^(-exp(Z^p)^(exp(Z^p)^(-exp(Z^p))))))))
with one parameter:
p = -0.051448293230 + 0.304348945637i
produces a shellfish like figure.
import warnings
warnings.filterwarnings('ignore')
import os
import sys
import numpy as np
import time
from IPython.display import display
sys.path.insert(1, '../src');
import z_plane as zp
import graphic_utility as gu;
import itergataters as ig
import numcolorpy as ncp
def starfish_ish_II(Z, p, Z0=None, ET=None):
""" Z = starfish_ish(Z, p)
Args:
Z: a real or complex number
p: a real of complex number
Returns:
Z: the result (complex)
"""
Z = Z = Z**(-np.exp(Z**p)**(np.exp(Z**p)**(-np.exp(Z**p)**(np.exp(Z**p)**(\
-np.exp(Z**p)**(np.exp(Z**p)**(-np.exp(Z**p))))))))
return Z
# One of Two parameter sets on this page
par_set = {'n_rows': 800, 'n_cols': 800}
par_set['center_point'] = 0.0 + 0.0j
par_set['theta'] = 0.0
par_set['zoom'] = 5/8
par_set['it_max'] = 16
par_set['max_d'] = 10 / par_set['zoom']
par_set['dir_path'] = os.getcwd()
p = -0.051448293230+0.304348945637j
list_tuple = [(starfish_ish_II, (p))]
t0 = time.time()
ET, Z, Z0 = ig.get_primitives(list_tuple, par_set)
tt = time.time() - t0
print(tt, '\t total time')
# Escape Time Graphical norm - graphically easier data
t0 = time.time()
Zd, Zr, ETn = ncp.etg_norm(Z0, Z, ET)
print('converstion time =\t', time.time() - t0)
# Distance at Escape Time: lighter traveled further
t0 = time.time()
D = ncp.mat_to_gray(Zd, max_v=255, min_v=64)
print('coloring time =\t',time.time() - t0)
display(D)
# Rotation at Escape Time: lighter rotated more
t0 = time.time()
R = ncp.mat_to_gray(Zr, max_v=255, min_v=64)
print('coloring time =\t',time.time() - t0)
display(R)
# H = Zr
# S = 1 - ncp.graphic_norm(Zd)
# V = 1 - ncp.graphic_norm(ET)
# Rotation > Hue, Distance > Saturation, Escape Time > Value (intensity-brightness) (muted)
H = ETn
S = Zd
V = Zr
Hue_width = 0.5
H_min = 0.0
H_max = H_min + Hue_width
S_max = 0.5
S_min = 0.05
V_max = 0.9
V_min = 0.2
t0 = time.time()
Ihsv = ncp.normat_hsv_intrgb(H, S, V, H_max, H_min, S_max, S_min, V_max, V_min)
print('coloring time:\t',time.time() - t0)
display(Ihsv)
# Second of Two parameter sets on this page
par_set = {'n_rows': 800, 'n_cols': 800}
par_set['center_point'] = 0.0 + 0.0j
par_set['theta'] = 0.0
par_set['zoom'] = 5/8
par_set['it_max'] = 64
par_set['max_d'] = 10 / par_set['zoom']
par_set['dir_path'] = os.getcwd()
p = 0.092988926871+0.463489247762j
list_tuple = [(starfish_ish_II, (p))]
t0 = time.time()
ET, Z, Z0 = ig.get_primitives(list_tuple, par_set)
tt = time.time() - t0
print(tt, '\t total time')
t0 = time.time()
Zd, Zr, ETn = ncp.etg_norm(Z0, Z, ET)
print('converstion time =\t', time.time() - t0)
# Rotation > Hue, Distance > Saturation, Escape Time > Value (intensity-brightness) (muted)
H = ETn
S = 1 - ETn
V = Zd
Hue_width = 0.5
H_min = 0.0
H_max = H_min + Hue_width
S_max = 0.5
S_min = 0.05
V_max = 0.9
V_min = 0.2
t0 = time.time()
Ihsv = ncp.normat_hsv_intrgb(H, S, V, H_max, H_min, S_max, S_min, V_max, V_min)
print('coloring time:\t',time.time() - t0)
display(Ihsv)
# First parameter set again
par_set = {'n_rows': 200, 'n_cols': 200}
par_set['center_point'] = 0.0 + 0.0j
par_set['theta'] = 0.0
par_set['zoom'] = 5/8
par_set['it_max'] = 16
par_set['max_d'] = 10 / par_set['zoom']
par_set['dir_path'] = os.getcwd()
p = -0.051448293230+0.304348945637j
list_tuple = [(starfish_ish_II, (p))]
t0 = time.time()
ET_sm, Z_sm, Z0_zm = ig.get_primitives(list_tuple, par_set)
tt = time.time() - t0
print(tt, '\t total time')
# view smaller - individual escape time starting points
for t in range(1,7):
print('ET =\t',t)
I = np.ones(ET_sm.shape)
I[ET_sm == t] = 0
display(ncp.mat_to_gray(I))
I = np.ones(ET_sm.shape)
I[ET_sm > 7] = 0
display(ncp.mat_to_gray(I))
# view smaller - individual escape time frequency
for k in range(0,int(ET_sm.max())):
print(k, (ET_sm == k).sum())
print('\nHow many never escaped:\n>',(ET_sm > k).sum())
# get the list of unescaped starting points and look for orbit points
Z_overs = Z0[ET_sm == ET_sm.max()]
v1 = Z_overs[0]
d = '%0.2f'%(np.abs(v1))
theta = '%0.1f'%(180*np.arctan2(np.imag(v1), np.real(v1))/np.pi)
print('One Unescaped Vector:\n\tV = ', d, theta, 'degrees\n')
print('%9d'%Z_overs.size, 'total unescaped points\n')
print('%9s'%('points'), 'near V', ' (plane units)')
for denom0 in range(1,12):
neighbor_distance = np.abs(v1) * 1/denom0
v1_list = Z_overs[np.abs(Z_overs-v1) < neighbor_distance]
print('%9d'%len(v1_list), 'within V/%2d (%0.3f)'%(denom0, neighbor_distance))